package com.sharpjvm.interpreter.runtime.heap;

import java.util.Collection;

/**
 * Created with IntelliJ IDEA.
 * User: zhuguoyin
 * Date: 13-3-8
 * Time: 下午9:37
 * To change this template use File | Settings | File Templates.
 */
public interface Heap {

    void put(byte[] key, Object value);

    Object get(byte[] key);

    HeapObjectContainer getContainer(byte[] key);

    void addHeapChangeListener(HeapChangeListener heapChangeListener);

    void removeHeapChangeListener(HeapChangeListener heapChangeListener);

    boolean containsReference(byte[] key);

    boolean containsValue(Object value);

    void remove(Object o);

    void removeByReference(byte[] key);

    void setHeapOrganizer(HeapOrganizer heapOrganizer);

    Collection<HeapObjectContainer> getAllHeapObject();
}
